from typing import Optional
from flask_babel import _

class AppInvokeQuotaExceededError(ValueError):
    """
    Custom exception raised when the quota for an app has been exceeded.
    """

    description = "App Invoke Quota Exceeded"
    def __init__(self):
        self.description = _("App Invoke Quota Exceeded")

class InvokeRateLimitError(ValueError):
    """Raised when the Invoke returns rate limit error."""

    description = "Rate Limit Error"
    def __init__(self):
        self.description = _("Rate Limit Error")
